import { goTo } from '@/global/move';
import { Logger } from '@/utils/logger';

/**
 * Hoho 的寻路模块，十分魔性
 */
Creep.prototype.goTo = function (target: RoomPosition | { pos: RoomPosition }, opts?: MoveToOpts) {
    if ('pos' in target) {
        return goTo(this, target.pos, opts);
    }
    else {
        return goTo(this, target, opts);
    }
};